<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.frame.platform.user.SessionOaUser"%>
<%@page import="com.frame.session.UserSession"%>
<%@page import="com.frame.platform.menu.MenuDao"%>
<%@page import="com.frame.platform.rank.Wfmenu"%>
<%
String path = request.getContextPath();
try{
String menuid=request.getParameter("menuId");
SessionOaUser user=UserSession.getAdminUser(request.getSession());
MenuDao mdao=new MenuDao();
List<Wfmenu> list=mdao.getRankSubMenu(user.getUserId(),user.getDeptId(),"001");
%>
<ul class="left_menu">
<%for(Wfmenu menu:list){ %>
<li class="topli close">
	<a id="menu<%=menu.getId() %>" href="javascript:main_left_click('<%=menu.getId() %>','<%=menu.getName() %>');" style="background:url(<%=path+menu.getPhoto() %>) no-repeat 20px center;"><%=menu.getName() %></a>
	<ul style="display:none">
	<%List<Wfmenu> clist=mdao.getRankSubMenu(user.getUserId(),user.getDeptId(),menu.getId());
	for(Wfmenu cmenu:clist){
	%>
		<li class="subli"><a id="menu<%=cmenu.getId() %>" href="javascript:main_left_click('<%=cmenu.getId() %>','<%=cmenu.getName() %>');"><%=cmenu.getName() %></a></li>
	<%} %>
	</ul>
</li>
<%} %>
</ul>
<%if(list.size()==1){ %>
<script>
main_left_click('<%=list.get(0).getId() %>','<%=list.get(0).getName() %>')
</script>
<%} %>
<%}catch(Exception ee){ee.printStackTrace();out.println("<script>window.location.href='"+path+"/platform'</script>");} %>